package com.tanhua.dubbo.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanhua.model.domain.Answer;
import com.tanhua.model.domain.Option;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OptionMapper extends BaseMapper<Option> {

    @Select("SELECT  id,tb_option.option,score,created,mock_question_id  FROM tb_option WHERE (mock_question_id = #{mockQuestionId})")
    List<Option> selectOptionListByMockQuestionId(String mockQuestionId);


    Integer findSumByAnswers(@Param("array") List<Answer> answers);
}
